libxl: vncviewer: make autopass work properly
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 4 Feb 2011 18:47:39 +0000 (18:47 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 4 Feb 2011 18:47:39 +0000 (18:47 +0000)
commita69a0358f60de0ce4d00645d1599f7f7284a32c2
treebb09386992df1a226e9addf303f2d047f1b8b8aa
parent2cc64e2e7c43b8dceb5bcde1ec9fa838069a860c
libxl: vncviewer: make autopass work properly

The file we write the vnc password to must be rewound back to the
beginning, or the vnc viewer will simply get EOF.

When the syscalls for communicating the password to the vnc client
fail, bomb out with an error messsage rather than blundering on (and
probably producing a spurious password prompt).

Following this patch, xl vncviewer --autopass works, provided the qemu
patch for writing the password to xenstore has also been applied.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c